#include "array.h"


int main(void)
{
  // 初始化数组
  int arr[5] = { 0 };
  int nums[5] = { 1, 2, 3, 4, 5 };
  // print_array(arr, 5);
  // print_array(nums, 5);

  // 随机访问
  // printf("%d\n", random_access(nums, 5));

  // 插入元素
  insert_elem(nums, 5, 6, 1);
  print_array(nums, 5);

  // 删除元素
  remove_elem(nums, 5, 1);
  print_array(nums, 5);

  // 查找元素
  printf("\n%d\n", find_elem(nums, 5, 10));

  // 扩容
  extend_array(nums, 5, 3);

  return 0;
}
